{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Loading data into memory"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "Loading API is central to a lot of nilmtk operations and provides a great deal of flexibility. Let's look at ways in which we can load data from a NILMTK DataStore into memory. To see the full range of possible queries, we'll use the [iAWE data set](http://iawe.github.io) (whose HDF5 file can be downloaded [here](https://copy.com/C2sIt1UfDx1mfPlC)).\n",
    "\n",
    "The `load` function returns a *generator* of DataFrames loaded from the DataStore based on the conditions specified. If no conditions are specified, then all data from all the columns is loaded.  (If you have not come across Python generators, it might be worth reading [this quick guide to Python generators](http://stackoverflow.com/a/1756156/732596).)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**NOTE**: If you are on Windows, remember to escape the back-slashes, use forward-slashs, or use raw-strings when passing paths in Python, e.g. one of the following would work:\n",
    "\n",
    "```python\n",
    "iawe = DataSet('c:\\\\data\\\\iawe.h5')\n",
    "iawe = DataSet('c:/data/iawe.h5')\n",
    "iawe = DataSet(r'c:\\data\\iawe.h5')\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MeterGroup(meters=\n",
       "  ElecMeter(instance=1, building=1, dataset='iAWE', site_meter, appliances=[])\n",
       "  ElecMeter(instance=2, building=1, dataset='iAWE', site_meter, appliances=[])\n",
       "  ElecMeter(instance=3, building=1, dataset='iAWE', appliances=[Appliance(type='fridge', instance=1)])\n",
       "  ElecMeter(instance=4, building=1, dataset='iAWE', appliances=[Appliance(type='air conditioner', instance=1)])\n",
       "  ElecMeter(instance=5, building=1, dataset='iAWE', appliances=[Appliance(type='air conditioner', instance=2)])\n",
       "  ElecMeter(instance=6, building=1, dataset='iAWE', appliances=[Appliance(type='washing machine', instance=1)])\n",
       "  ElecMeter(instance=7, building=1, dataset='iAWE', appliances=[Appliance(type='computer', instance=1)])\n",
       "  ElecMeter(instance=8, building=1, dataset='iAWE', appliances=[Appliance(type='clothes iron', instance=1)])\n",
       "  ElecMeter(instance=9, building=1, dataset='iAWE', appliances=[Appliance(type='unknown', instance=1)])\n",
       "  ElecMeter(instance=10, building=1, dataset='iAWE', appliances=[Appliance(type='television', instance=1)])\n",
       "  ElecMeter(instance=11, building=1, dataset='iAWE', appliances=[Appliance(type='wet appliance', instance=1)])\n",
       ")"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from nilmtk import DataSet\n",
    "\n",
    "iawe = DataSet('/data/iawe.h5')\n",
    "elec = iawe.buildings[1].elec\n",
    "elec"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let us see what measurements we have for the fridge:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('current', None),\n",
       " ('power', 'active'),\n",
       " ('frequency', None),\n",
       " ('power factor', None),\n",
       " ('power', 'apparent'),\n",
       " ('power', 'reactive'),\n",
       " ('voltage', None)]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fridge = elec['fridge']\n",
    "fridge.available_columns()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Loading data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Load all columns (default)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>current</th>\n",
       "      <th>power</th>\n",
       "      <th>frequency</th>\n",
       "      <th colspan=\"2\" halign=\"left\">power</th>\n",
       "      <th>voltage</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th></th>\n",
       "      <th>active</th>\n",
       "      <th></th>\n",
       "      <th>apparent</th>\n",
       "      <th>reactive</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:30:00+05:30</th>\n",
       "      <td>0.011000</td>\n",
       "      <td>0.166925</td>\n",
       "      <td>50.157169</td>\n",
       "      <td>2.660094</td>\n",
       "      <td>2.652679</td>\n",
       "      <td>241.494720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:31:00+05:30</th>\n",
       "      <td>0.010981</td>\n",
       "      <td>0.169385</td>\n",
       "      <td>50.148460</td>\n",
       "      <td>2.647615</td>\n",
       "      <td>2.640115</td>\n",
       "      <td>242.189423</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:32:00+05:30</th>\n",
       "      <td>0.011000</td>\n",
       "      <td>0.177887</td>\n",
       "      <td>50.143394</td>\n",
       "      <td>2.672245</td>\n",
       "      <td>2.666358</td>\n",
       "      <td>243.750381</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:33:00+05:30</th>\n",
       "      <td>0.010982</td>\n",
       "      <td>0.175929</td>\n",
       "      <td>50.095535</td>\n",
       "      <td>2.685518</td>\n",
       "      <td>2.677607</td>\n",
       "      <td>245.131790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:34:00+05:30</th>\n",
       "      <td>0.010978</td>\n",
       "      <td>0.177044</td>\n",
       "      <td>50.099998</td>\n",
       "      <td>2.694733</td>\n",
       "      <td>2.688200</td>\n",
       "      <td>246.001328</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity           current     power  frequency     power            \\\n",
       "type                                   active             apparent  reactive   \n",
       "2013-07-13 05:30:00+05:30  0.011000  0.166925  50.157169  2.660094  2.652679   \n",
       "2013-07-13 05:31:00+05:30  0.010981  0.169385  50.148460  2.647615  2.640115   \n",
       "2013-07-13 05:32:00+05:30  0.011000  0.177887  50.143394  2.672245  2.666358   \n",
       "2013-07-13 05:33:00+05:30  0.010982  0.175929  50.095535  2.685518  2.677607   \n",
       "2013-07-13 05:34:00+05:30  0.010978  0.177044  50.099998  2.694733  2.688200   \n",
       "\n",
       "physical_quantity             voltage  \n",
       "type                                   \n",
       "2013-07-13 05:30:00+05:30  241.494720  \n",
       "2013-07-13 05:31:00+05:30  242.189423  \n",
       "2013-07-13 05:32:00+05:30  243.750381  \n",
       "2013-07-13 05:33:00+05:30  245.131790  \n",
       "2013-07-13 05:34:00+05:30  246.001328  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load())\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Load a single column of power data\n",
    "\n",
    "Use `fridge.power_series()` which returns a generator of 1-dimensional `pandas.Series` objects, each containing power data using the most 'sensible' AC type:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2013-07-13 05:30:00+05:30    0.166925\n",
       "2013-07-13 05:31:00+05:30    0.169385\n",
       "2013-07-13 05:32:00+05:30    0.177887\n",
       "2013-07-13 05:33:00+05:30    0.175929\n",
       "2013-07-13 05:34:00+05:30    0.177044\n",
       "Name: (power, active), dtype: float32"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series = next(fridge.power_series())\n",
    "series.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "or, to get reactive power:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2013-07-13 05:30:00+05:30    2.652679\n",
       "2013-07-13 05:31:00+05:30    2.640115\n",
       "2013-07-13 05:32:00+05:30    2.666358\n",
       "2013-07-13 05:33:00+05:30    2.677607\n",
       "2013-07-13 05:34:00+05:30    2.688200\n",
       "Name: (power, reactive), dtype: float32"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series = next(fridge.power_series(ac_type='reactive'))\n",
    "series.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Specify physical_quantity or AC type"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>reactive</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:30:00+05:30</th>\n",
       "      <td>2.652679</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:31:00+05:30</th>\n",
       "      <td>2.640115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:32:00+05:30</th>\n",
       "      <td>2.666358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:33:00+05:30</th>\n",
       "      <td>2.677607</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:34:00+05:30</th>\n",
       "      <td>2.688200</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity             power\n",
       "type                       reactive\n",
       "2013-07-13 05:30:00+05:30  2.652679\n",
       "2013-07-13 05:31:00+05:30  2.640115\n",
       "2013-07-13 05:32:00+05:30  2.666358\n",
       "2013-07-13 05:33:00+05:30  2.677607\n",
       "2013-07-13 05:34:00+05:30  2.688200"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(physical_quantity='power', ac_type='reactive'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To load voltage data:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>voltage</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:30:00+05:30</th>\n",
       "      <td>241.494720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:31:00+05:30</th>\n",
       "      <td>242.189423</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:32:00+05:30</th>\n",
       "      <td>243.750381</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:33:00+05:30</th>\n",
       "      <td>245.131790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:34:00+05:30</th>\n",
       "      <td>246.001328</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity             voltage\n",
       "type                                 \n",
       "2013-07-13 05:30:00+05:30  241.494720\n",
       "2013-07-13 05:31:00+05:30  242.189423\n",
       "2013-07-13 05:32:00+05:30  243.750381\n",
       "2013-07-13 05:33:00+05:30  245.131790\n",
       "2013-07-13 05:34:00+05:30  246.001328"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(physical_quantity='voltage'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th colspan=\"3\" halign=\"left\">power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>active</th>\n",
       "      <th>apparent</th>\n",
       "      <th>reactive</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:30:00+05:30</th>\n",
       "      <td>0.166925</td>\n",
       "      <td>2.660094</td>\n",
       "      <td>2.652679</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:31:00+05:30</th>\n",
       "      <td>0.169385</td>\n",
       "      <td>2.647615</td>\n",
       "      <td>2.640115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:32:00+05:30</th>\n",
       "      <td>0.177887</td>\n",
       "      <td>2.672245</td>\n",
       "      <td>2.666358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:33:00+05:30</th>\n",
       "      <td>0.175929</td>\n",
       "      <td>2.685518</td>\n",
       "      <td>2.677607</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:34:00+05:30</th>\n",
       "      <td>0.177044</td>\n",
       "      <td>2.694733</td>\n",
       "      <td>2.688200</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity             power                    \n",
       "type                         active  apparent  reactive\n",
       "2013-07-13 05:30:00+05:30  0.166925  2.660094  2.652679\n",
       "2013-07-13 05:31:00+05:30  0.169385  2.647615  2.640115\n",
       "2013-07-13 05:32:00+05:30  0.177887  2.672245  2.666358\n",
       "2013-07-13 05:33:00+05:30  0.175929  2.685518  2.677607\n",
       "2013-07-13 05:34:00+05:30  0.177044  2.694733  2.688200"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(physical_quantity = 'power'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Loading by specifying AC type"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>active</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:30:00+05:30</th>\n",
       "      <td>0.166925</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:31:00+05:30</th>\n",
       "      <td>0.169385</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:32:00+05:30</th>\n",
       "      <td>0.177887</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:33:00+05:30</th>\n",
       "      <td>0.175929</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:34:00+05:30</th>\n",
       "      <td>0.177044</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity             power\n",
       "type                         active\n",
       "2013-07-13 05:30:00+05:30  0.166925\n",
       "2013-07-13 05:31:00+05:30  0.169385\n",
       "2013-07-13 05:32:00+05:30  0.177887\n",
       "2013-07-13 05:33:00+05:30  0.175929\n",
       "2013-07-13 05:34:00+05:30  0.177044"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(ac_type='active'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Loading by resampling to a specified period"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>active</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:30:00+05:30</th>\n",
       "      <td>0.166925</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:31:00+05:30</th>\n",
       "      <td>0.169385</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:32:00+05:30</th>\n",
       "      <td>0.177887</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:33:00+05:30</th>\n",
       "      <td>0.175929</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-07-13 05:34:00+05:30</th>\n",
       "      <td>0.177044</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity             power\n",
       "type                         active\n",
       "2013-07-13 05:30:00+05:30  0.166925\n",
       "2013-07-13 05:31:00+05:30  0.169385\n",
       "2013-07-13 05:32:00+05:30  0.177887\n",
       "2013-07-13 05:33:00+05:30  0.175929\n",
       "2013-07-13 05:34:00+05:30  0.177044"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# resample to minutely (i.e. with a sample period of 60 secs)\n",
    "df = next(fridge.load(ac_type='active', sample_period=60))\n",
    "df.head()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
